#include "SwarmSceneShaders.h"

#include <cassert>
#include <d3d11.h>

#include "main/Globals.h"

#include "managers/ShadersManager.h"

namespace swarmScene {
	Shaders::Shaders() 
		: mCS(nullptr)
		, mVS(nullptr)
		, mGS(nullptr)
		, mPS(nullptr)
	{
		assert(Globals::gShaders);
		ShadersManager& shaders = *Globals::gShaders;

		// Compute shader
		mCS = shaders.addComputeShader(L"cs", L"hlsl/swarmScene/CS.cso");
		assert(mCS);

		// Vertex shader
		mVS = shaders.addVertexShader(L"vs", L"hlsl/swarmScene/VS.cso", nullptr, nullptr, nullptr);
		assert(mVS);

		// Geometry shader
		mGS = shaders.addGeometryShader(L"gs", L"hlsl/swarmScene/GS.cso");
		assert(mGS);

		// Pixel shader
		mPS = shaders.addPixelShader(L"ps", L"hlsl/swarmScene/PS.cso");
		assert(mPS);
	}
}